﻿using PC.AzureMultiApp.WebRoleMultiApp.Controllers;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting.Web;
using System.Web.Mvc;
using PC.AzureMultiApp.Storage.Moles;
using PC.AzureMultiApp.Storage;
using System.Collections.Generic;
using PC.AzureMultiApp.Core.Applications.Moles;
using PC.AzureMultiApp.Core.Models;

namespace PC.AzureMultiApp.WebRoleMultiApp.Tests
{
    
    
    /// <summary>
    ///This is a test class for ApplicationControllerTest and is intended
    ///to contain all ApplicationControllerTest Unit Tests
    ///</summary>
    [TestClass()]
    public class ApplicationControllerTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        [TestMethod]
        [HostType("Moles")]
        public void Application_NoElements_Test()
        {
            // Arrange

            MApplications.GetAll = ()
                =>
            {
                return new List<ApplicationModel>();
            };

            ApplicationController controller = new ApplicationController();


            // Act
            ViewResult result = controller.Application() as ViewResult;

            // Assert
            Assert.IsNotNull(result.Model);
        }

       
    }
}
